<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:util="http://java.sun.com/jsf/composite/util">

<ui:composition>
	<h:form>
		<rich:panel>
			<h:panelGrid columns="1">
				<h:panelGrid columns="2" cellpadding="4">
					<util:formField
						beanProperty="#{clientRegisterBean.client.first_name}"
						title="#{msgs.accountManagementFIRST_NAME_FIELD}" size="48"
						required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.last_name}"
						title="#{msgs.accountManagementLAST_NAME_FIELD}" size="49"
						required="true" />
				</h:panelGrid>
				<h:outputText value="#{msgs.accountManagementBIRTHDAY_FIELD} "
					styleClass="formOutputField" />
				<rich:calendar value="#{clientRegisterBean.client.date_of_birth}"
					id="calendar" datePattern="d/M/yy" showApplyButton="true"
					cellWidth="24px" cellHeight="22px" style="width:200px">
				</rich:calendar>
				<br />
				<h:outputText value="#{msgs.accountManagementADDRESS_FIELD}"
					style="font-size: 14px;" />
				<h:panelGrid columns="3" cellpadding="4">
					<util:formField beanProperty="#{clientRegisterBean.client.street}"
						title="#{msgs.accountManagementSTREET_FIELD}" size="50"
						required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.house_number}"
						title="#{msgs.accountManagementHOUSE_NUMBER_FIELD}" size="20"
						required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.apartment_number}"
						title="#{msgs.accountManagementAPARTMENT_NUMBER_FIELD}" size="20"
						required="true" />
				</h:panelGrid>
				<h:panelGrid columns="2" cellpadding="4">
					<util:formField beanProperty="#{clientRegisterBean.client.post}"
						title="#{msgs.accountManagementPOST_FIELD}" size="70"
						required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.postal_code}"
						title="#{msgs.accountManagementPOSTAL_CODE_FIELD}" size="27"
						required="true" />
				</h:panelGrid>
				<br />

				<h:outputText value="#{msgs.accountManagementCONTACT_FIELD}"
					style="font-size: 14px;" />
				<util:formField beanProperty="#{clientRegisterBean.client.email}"
					title="#{msgs.accountManagementEMAIL_FIELD}" size="106"
					required="true" />
				<util:formField beanProperty="#{clientRegisterBean.client.phone}"
					title="#{msgs.accountManagementPHONE_FIELD}" size="106"
					required="true" />
			</h:panelGrid>

			<h:panelGrid columns="2" cellspacing="10"
				style="margin-left: auto; margin-right: auto;">
				<h:commandButton value="#{msgs.accountManagementSAVE_BUTTON}"
					actionListener="#{clientRegisterBean.createClient}" />
				<h:commandButton value="#{msgs.accountManagementCANCEL_BUTTON}"
					action="#{jsfutils.redirect('mainContent/booksTablePage')}" />
			</h:panelGrid>
		</rich:panel>
	</h:form>
</ui:composition>
</html>
